package com.nut.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nut.api.resp.GoodsSpecResp;
import com.nut.common.BaseEntity;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@TableName("mall_goods")
public class Goods extends BaseEntity {

    private Integer id;

    //店铺名
    private String title;

    //商品所属类目ID
    private Integer categoryId;

    //缩略图
    private String img;

    //原价
    private Integer price;

    //销售价格，现价
    private Integer salePrice;

    //排序
    private Integer sort;

    //新品推荐 >0 分值按从小到大排序
    private Integer news;

    //热门推荐 >0 分值按从小到大排序
    private Integer hot;

    //置顶推荐 >0 分值按从小到大排序
    private Integer top;

    //底部推荐 >0 分值按从小到大排序
    private Integer down;

    //库存数量 -1数量不限
    private Integer stock;

    //浏览量
    private Integer browse;

    //已销售总量
    private Integer sales;

    //开卖时间
    private Date startBuy;

    //上架时间
    private Date upTime;

    //下架时间
    private Date downTime;

    //状态  0已下架 1已上架
    private Integer status;

    //是否为实际商品 1是 0否
    private Integer actual;

    //是否支持退款 1支付 0不支持 默认支持
    private Integer canRefund;

    //佣金比例
    private Integer bonusRate;

//    ---------------------- 附加信息---------------

    //轮播图
    @TableField(exist = false)
    private String sliderImg;

    //订购须知
    @TableField(exist = false)
    private String orderingInfo;

    //商品详情描述
    @TableField(exist = false)
    private String content;

    //视频地址
    @TableField(exist = false)
    private String video;

    @TableField(exist = false)
    private List<GoodsSpecResp> specList;

    @TableField(exist = false)
    private List<GoodsStock> stockList;

}
